package com.jonluo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication(scanBasePackages = "com.jonluo")
public class Application {

  private static Logger logger = LoggerFactory.getLogger(Application.class);

  @RequestMapping(method = RequestMethod.GET, path = "/")
  public String hello() {
    logger.debug("hello");
    return "hello";
  }

  @RequestMapping(method = RequestMethod.GET, path = "/hi")
  public String hi() {
    logger.debug("hi");
    return "jonluo";
  }

  public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
  }
}